<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>

	<f:loadBundle basename="bundle.common" var="commonBundle"/>
	<rich:panel styleClass="panelBox">
		<f:facet name="header"><h:outputText value="#{title}"/></f:facet>
		<h:panelGroup rendered="#{switch.viewMode}">
			<ui:insert name="view"/>
			<a4j:form>
				<a4j:commandLink value="#{commonBundle.edit}" action="#{switch.edit}" reRender="content"/>
			</a4j:form>
		</h:panelGroup>
		<h:panelGroup rendered="#{switch.editMode}">
			<a4j:form>
				<ui:insert name="edit"/>
				<a4j:commandButton value="#{commonBundle.save}" action="#{switch.save}" reRender="content"/>
				<a4j:commandButton value="#{commonBundle.cancel}" action="#{switch.cancel}" reRender="content" immediate="true"/>
			</a4j:form>
		</h:panelGroup>
	</rich:panel>

</ui:composition>